package com.errol.batchprocessor.payroll.advisor.verify;

import com.renjia.service.module.employeeaddition.advisorimpl.payroll.payload.PayrollEmployeeBatchPayload;
import com.renjia.service.module.employeeaddition.advisorimpl.payroll.payload.PayrollEmployeePiecePayload;
import com.renjia.service.module.payroll.advisor.AbstractPayrollAdvisor;
import org.springframework.lang.NonNull;

/**
 * 费用发放验证 批次启动时 的扩展
 *
 * @author zhang xiao bin
 * @version v1.0
 * @date 2021/03/18
 * @since v5.0.6
 **/
public interface PayrollVerifyPiecePostAdvisor extends AbstractPayrollAdvisor {

    /**
     * 发放验证阶段，分片验证结束后（成功或异常）触发
     *
     * @param piecePayload 分片数据
     * @param batchPayload 批次数据
     * @return true 表示启动成功，false 表示拦截该批次；该扩展点所有实现只要有一个返回 false，即拦截批次
     */
    boolean doCleanUpOnPayrollDetailPieceProcessPostAtVerifyStage(@NonNull PayrollEmployeePiecePayload piecePayload, @NonNull PayrollEmployeeBatchPayload batchPayload);
}
